1. Field of the Invention
The invention relates to data processing systems and more particularly to processors which process data strings in a data processor system.
2. Prior Art
Data processing systems are designed to operate on data stored in memory and to perform a variety of operations with respect to the data. Data is typically stored in memory in the form of data words which may be several bytes in length, e.g., eight bytes of eight binary bits each. Certain types of data is presented in the form of a data string which comprises a number of bytes, oftentimes greater than the number of bytes that can be stored in a single memory word, and the number of bytes in a string are not necessarily a multiple of the number of bytes in a memory word. Thus, a string may fully occupy some memory words and partially occupy another. Furthermore, for purposes of saving the memory space and for convenience to programmers, it is desirable not to require that a data string start at the beginning of a memory word or end at the end of a memory word. Under those conditions, the beginning portion of a data string may partially occupy one memory word location and the ending portion of the string may partially occupy another memory word location.
There are a number of known processor instructions for manipulating data strings such as the MOVE instruction which causes the data string to be moved from one memory location to another; the SEARCH instruction which searches the contents of the memory string for certain predefined conditions; and COMPARE instructions which compare the bytes in two separate strings to determine equality conditions. A data string is typically defined by a starting address and data defining the number of bytes in the string. String manipulation, by means of such instructions as mentioned above, may be executed by the use of a program subroutine which takes into account the memory word boundary conditions during manipulation of the string. However, such software manipulation is rather complex and therefore time consuming to the data processor. It is therefore desirable to provide an alternative in which data strings may be processed more efficiently.